<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org"
	xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
	layout:decorate="~{admin/common/common}">
<head>
<title>角色列表</title>
</head>

<body layout:fragment="content">
	<form id="myForm" th:action="@{/admin/role}" th:method="get">
		<div class="page-container">
			<div class="cl pd-5 bg-1 bk-gray">
				<span class="l" sa:hasPermission="role:add"> <a
					class="btn btn-primary radius" href="javascript:;"
					onclick="admin_role_add('添加角色','admin-role-add.html','800')"
					th:onclick="'javascript:admin_role_add(\'添加角色\',\'/role/add\',\'500\',\'280\');'"><i
						class="Hui-iconfont">&#xe600;</i> 添加角色</a>
				</span>
			</div>
			<table class="table table-border table-bordered table-hover table-bg">
				<thead>
					<tr>
						<th scope="col" colspan="3">角色管理</th>
					</tr>
					<tr class="text-c">
						<th>角色名</th>
						<th>角色编码</th>
						<th>描述</th>
						<th width="100">操作</th>
					</tr>
				</thead>
				<tbody>
					<tr class="text-c" th:each="model:${pageInfo?.result}"
						th:object="${model}">
						<!--<td><input type="checkbox" value="" name=""></td>-->
						<!--<td th:text="*{id}">1</td>-->
						<td th:text="*{name}">超级管理员</td>
						<td th:text="*{code}">超级管理员</td>
						<!--<td><a href="#">admin</a></td>-->
						<td th:text="*{description}">拥有至高无上的权利</td>
						<td class="f-14"><a sa:hasPermission="role:authorisation"
							title="授权" href="javascript:;" style="text-decoration: none"
							th:onclick="'javascript:admin_role_permission(\'角色授权\',\'/role/permission?roleId='+*{id}+'\',\'380\',\'600\');'"><i
								class="iconfont">&#xe68f;</i></a> <a title="编辑" sa:hasPermission="role:edit" href="javascript:;"
							onclick="admin_role_edit('角色编辑','admin-role-add.html','1')"
							th:onclick="'javascript:admin_role_edit(\'角色编辑\',\'/role/edit?id='+*{id}+'\',\'500\',\'280\');'"
							style="text-decoration: none"><i class="Hui-iconfont">&#xe6df;</i></a>
							<a sa:hasPermission="role:delete" title="删除" href="javascript:;"
							onclick="admin_role_del(this,'1')"
							th:onclick="'javascript:admin_role_del(this, \'/role/delete/'+*{id}+'\');'"
							class="ml-5" style="text-decoration: none"><i
								class="Hui-iconfont">&#xe6e2;</i></a> <!--iconfontyyy--></td>
					</tr>
				</tbody>
			</table>
			<div th:replace="admin/common/page :: page"></div>
		</div>
	</form>

	<script type="text/javascript" th:src="@{/js/common/page.js}"></script>
	<script type="text/javascript"
		th:src="@{/js/admin/manager/admin-role.js}"></script>
</body>
</html>